home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atlas of Florida
/
Atlas of Florida.iso
/
Movies
/
1.0 Introduction
/
1.0 Introduction
/
00242_Script_242
< prev
next >
Wrap
Text File
|
1994-08-23
|
14KB
|
363 lines
-- Distance return text popUp menu
on AlphabetMenu -- a pop up menu returning item text
global PopAlpha
-- dispose of any previous instances, if any
if objectP( PopAlpha ) then PopAlpha( mDispose )
set menuList = the text of cast "DisMenList1"
-- Be sure to set parameter itemNum for PopNum or PopText to zero.
set PopAlpha = PopMenu(mNew,menuList, 216)
if not objectP( PopAlpha ) then
alert "PopMenu Object not made: " & string( PopAlpha )
end if
-- to set automatic remembering of last item selected
PopAlpha(mSmart, 1 )
-- PopMenu uses screen co÷rdinates, which must be changed
-- to window co÷rdinates with the StageLeft & stageTop functions
set sH = the left of sprite 6 + the stageLeft + 1
set sV = the top of sprite 6 + the stageTop + 1
set result = PopAlpha(mPopText, sH, sV, 0)
if string( result ) = "" then exit
else set the text of cast "DisMen1" to " " & string( result )
MakeConversion
-- dispose of this menu
if objectP( PopAlpha ) then PopAlpha( mDispose )
on AlphabetMenu2 -- a pop up menu returning item text
global PopAlpha2
-- dispose of any previous instances, if any
if objectP( PopAlpha2 ) then PopAlpha2( mDispose )
set menuList = the text of cast "DisMenList2"
-- Be sure to set parameter itemNum for PopNum or PopText to zero.
set PopAlpha2 = PopMenu(mNew,menuList, 216)
if not objectP( PopAlpha2 ) then
alert "PopMenu Object not made: " & string( PopAlpha2 )
end if
-- to set automatic remembering of last item selected
PopAlpha2(mSmart, 1 )
-- PopMenu uses screen co÷rdinates, which must be changed
-- to window co÷rdinates with the StageLeft & stageTop functions
set sH = the left of sprite 9 + the stageLeft + 1
set sV = the top of sprite 9 + the stageTop + 1
set result = PopAlpha2(mPopText, sH, sV, 0)
if string( result ) = "" then exit
else set the text of cast "DisMen2" to " " & string( result )
MakeConversion
-- dispose of this menu
if objectP( PopAlpha2 ) then PopAlpha2( mDispose )
on MakeConversion -- does conversion based on the menus and the entered value
showChannel 8
-- hide other answers
hideChannel 14
hideChannel 20
put string(the text of cast "DisMen1") into menu1
put string(the text of cast "DisMen2") into menu2
put value(the text of cast "DisValue") into cValue -- entered by user
put "?" into field "Answer"
if menu1 = " in" then
if menu2 = " in" then
put cValue into field "Answer"
put cValue into field "AnswerString"
end if
if menu2 = " ft" then
put ( cValue / 12.0) into field "Answer"
put cValue & " / 12" into field "AnswerString"
end if
if menu2 = " yd" then
put ( cValue / 36.0 ) into field "Answer"
put cValue & " / 36" into field "AnswerString"
end if
if menu2 = " mi" then
put ( (cValue / 12.0 ) / 5280.0 ) into field "Answer"
put "( " & cValue & " / 12 ) / 5280" into field "AnswerString"
end if
if menu2 = " mm " then
put ( cValue * 2.54 ) * 100.0 into Field "Answer"
put "( " & cValue & " * 2.54 ) * 100" into field "AnswerString"
end if
if menu2 = " cm" then
put ( cValue * 2.54 ) into Field "Answer"
put cValue & " * 2.54" into field "AnswerString"
end if
if menu2 = " m" then
put ( (cValue * 2.54 ) / 100.0 ) into field "Answer"
put "( " & cValue & " * 2.54 ) / 100" into field "AnswerString"
end if
if menu2 = " km" then
put ( ( cvalue * 2.54 ) / 100.0 / 1000.0 ) into field "Answer"
put "( ( " & cValue & " * 2.54 ) / 100 ) / 1,000" into field "AnswerString"
end if
end if
if menu1 = " ft" then
if menu2 = " in" then
put ( cValue * 12.0 ) into field "Answer"
put cValue & " * 12" into field "AnswerString"
end if
if menu2 = " ft" then
put cValue into field "Answer"
put cValue into field "AnswerString"
end if
if menu2 = " yd" then
put ( cValue / 3.0 ) into field "Answer"
put cValue & " / 3" into field "AnswerString"
end if
if menu2 = " mi" then
put ( cValue / 5280.0 ) into field "Answer"
put cValue & " / 5280" into field "AnswerString"
end if
if menu2 = " mm " then
put ( cValue * .3048 ) * 100.0 * 100.0 into Field "Answer"
put "( ( " & cValue & " * .3048 ) * 100 ) * 100" into field "AnswerString"
end if
if menu2 = " cm" then
put ( cValue * .3048 ) * 100.0 into Field "Answer"
put "( " & cValue & " * .3048 ) * 100" into field "AnswerString"
end if
if menu2 = " m" then
put ( cValue * .3048 ) into field "Answer"
put cValue & " * .3048" into field "AnswerString"
end if
if menu2 = " km" then
put ( ( cValue * .3048 ) / 1000.0 ) into field "Answer"
put "( " & cValue & " * .3048 ) / 1,000" into field "AnswerString"
end if
end if
if menu1 = " yd" then
if menu2 = " in" then
put ( cValue * 36.0 ) into field "Answer"
put cValue & " * 36" into field "AnswerString"
end if
if menu2 = " ft" then
put ( cValue * 3.0 ) into field "Answer"
put cValue & " * 3" into field "AnswerString"
end if
if menu2 = " yd" then
put cValue into field "Answer"
put cValue into field "AnswerString"
end if
if menu2 = " mi" then
put ( cValue * 3.0 / 5280.0 ) into field "Answer"
put "( " & cValue & " * 3 ) / 5,280" into field "AnswerString"
end if
if menu2 = " mm " then
put ( ( cValue * .9144 ) * 100.0 ) * 100.0 into field "Answer"
put "( ( " & cValue & " * .9144 ) * 100 ) * 100" into field "AnswerString"
end if
if menu2 = " cm" then
put ( ( cValue * .9144 ) * 100.0 ) into field "Answer"
put "( " & cValue & " * .9144 ) * 100" into field "AnswerString"
end if
if menu2 = " m" then
put ( cValue * .9144 ) into field "Answer"
put cValue & " * .9144" into field "AnswerString"
end if
if menu2 = " km" then
put ( ( cValue * .9144 ) / 1000.0 ) into field "Answer"
put "( " & cValue & " * .9144 ) / 1,000" into field "AnswerString"
end if
end if
if menu1 = " mi" then
if menu2 = " in" then
put ( cValue * 5280.0 * 12.0 ) into field "Answer"
put "( " & cValue & " * 5,280 ) * 12" into field "AnswerString"
end if
if menu2 = " ft" then
put ( cValue * 5280.0 ) into field "Answer"
put cValue & " * 5,280" into field "AnswerString"
end if
if menu2 = " yd" then
put ( ( cValue * 5280.0 ) / 3.0 ) into field "Answer"
put "( " & cValue & " * 5,280 ) / 3" into field "AnswerString"
end if
if menu2 = " mi" then
put cValue into field "Answer"
put cValue into field "AnswerString"
end if
if menu2 = " mm " then
put ( cValue * 1.6093 ) * 1000.0 * 100.0 * 100.0 into field "Answer"
put "( ( ( " & cValue & " * 1.6093 ) 1,000 ) * 100 ) * 100" into field "AnswerString"
end if
if menu2 = " cm" then
put ( cValue * 1.6093 ) * 1000.0 * 100.0 into field "Answer"
put "( ( " & cValue & " * 1.6093 ) * 1,000 ) * 100" into field "AnswerString"
end if
if menu2 = " m" then
put ( cValue * 1.6093 ) * 1000.0 into field "Answer"
put "( " & cValue & " * 1.6093 ) * 1,000" into field "AnswerString"
end if
if menu2 = " km" then
put ( cValue * 1.6093 ) into field "Answer"
put cValue & " * 1.6093" into field "AnswerString"
end if
end if
if menu1 = " mm " then
if menu2 = " in" then
put ( cValue * 0.03937 ) into field "Answer"
put cValue & " * .03937" into field "AnswerString"
end if
if menu2 = " ft" then